﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using C1.Win.C1Input;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_AddHoaDonBanHang : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("advKhachHang")]
        private ADVObjects _advKhachHang;
        [AccessedThroughProperty("Button1")]
        private Button _Button1;
        [AccessedThroughProperty("CKCheckAll")]
        private CheckBox _CKCheckAll;
        [AccessedThroughProperty("CmdExit")]
        private Button _CmdExit;
        [AccessedThroughProperty("CmdOK")]
        private Button _CmdOK;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label15")]
        private Label _Label15;
        [AccessedThroughProperty("Label7")]
        private Label _Label7;
        [AccessedThroughProperty("Panel1")]
        private Panel _Panel1;
        [AccessedThroughProperty("Panel2")]
        private Panel _Panel2;
        [AccessedThroughProperty("TxtNgayChungTu")]
        private DateTimePicker _TxtNgayChungTu;
        [AccessedThroughProperty("TxtSoTien")]
        private C1NumericEdit _TxtSoTien;
        [AccessedThroughProperty("TxtTongSoDuNo")]
        private C1NumericEdit _TxtTongSoDuNo;
        [AccessedThroughProperty("VSlist")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSlist;
        public string cFrmKhoa;
        private IContainer components;
        public object objFrmCall;
        private clsChungTuQuy objTT;

        public Frm_AddHoaDonBanHang()
        {
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.objTT = new clsChungTuQuy();
            this.cFrmKhoa = "";
            this.InitializeComponent();
        }

        private void advKhachHang_ValueChanged(object sender, EventArgs e)
        {
            this.LoadThanhToan();
            double num = new clsDMDoiTuong().GetSoDuCongNo(this.advKhachHang.Value, LVYModule.sLeft(LVYModule.Date2Char(this.TxtNgayChungTu.Text), 6), "NO", modGeneral.H_CLIENT, "131");
            this.TxtTongSoDuNo.Value = num;
        }

        private void CKCheckAll_Click(object sender, EventArgs e)
        {
            int num;
            if (this.CKCheckAll.Checked)
            {
                int num2 = this.VSlist.Rows.Count - 1;
                for (num = 1; num <= num2; num++)
                {
                    this.VSlist[num, 1] = 1;
                    RowColEventArgs args = new RowColEventArgs(num, 1);
                    this.VSlist_AfterEdit(this.VSlist, args);
                }
            }
            else
            {
                int num3 = this.VSlist.Rows.Count - 1;
                for (num = 1; num <= num3; num++)
                {
                    this.VSlist[num, 1] = 0;
                    RowColEventArgs args2 = new RowColEventArgs(num, 1);
                    this.VSlist_AfterEdit(this.VSlist, args2);
                }
            }
        }

        private void CmdExit_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdOK_Click(object sender, EventArgs e)
        {
            if (this.VSlist.Rows.Count != 1)
            {
                C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                int num2 = this.VSlist.Rows.Count - 1;
                for (int i = 1; i <= num2; i++)
                {
                    if (Conversion.Val(RuntimeHelpers.GetObjectValue(vSlist[i, 1])) != 0.0)
                    {
                        object[] objArray = new object[11];
                        C1.Win.C1FlexGrid.C1FlexGrid grid2 = vSlist;
                        int num3 = i;
                        int num4 = 2;
                        objArray[0] = RuntimeHelpers.GetObjectValue(grid2[num3, num4]);
                        C1.Win.C1FlexGrid.C1FlexGrid grid3 = vSlist;
                        int num5 = i;
                        int num6 = 3;
                        objArray[1] = RuntimeHelpers.GetObjectValue(grid3[num5, num6]);
                        C1.Win.C1FlexGrid.C1FlexGrid grid4 = vSlist;
                        int num7 = i;
                        int num8 = 0;
                        objArray[2] = RuntimeHelpers.GetObjectValue(grid4[num7, num8]);
                        objArray[3] = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 5]), "", modGeneral.TypeOfValue.Nothing).ToString();
                        objArray[4] = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 6]), "", modGeneral.TypeOfValue.Nothing).ToString();
                        objArray[5] = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 7]), "", modGeneral.TypeOfValue.Nothing).ToString();
                        objArray[6] = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 8]), 0, modGeneral.TypeOfValue.Nothing));
                        objArray[7] = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 9]), "", modGeneral.TypeOfValue.Nothing).ToString();
                        objArray[8] = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 10]), "", modGeneral.TypeOfValue.Nothing).ToString();
                        objArray[9] = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 15]), 0, modGeneral.TypeOfValue.Nothing));
                        objArray[10] = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 15]), 0, modGeneral.TypeOfValue.Nothing));
                        object[] arguments = objArray;
                        bool[] copyBack = new bool[] { true, true, true, false, false, false, false, false, false, false, false };
                        NewLateBinding.LateCall(this.objFrmCall, null, "AddHoaDon", arguments, null, null, copyBack, true);
                        if (copyBack[0])
                        {
                            grid2[num3, num4] = RuntimeHelpers.GetObjectValue(arguments[0]);
                        }
                        if (copyBack[1])
                        {
                            grid3[num5, num6] = RuntimeHelpers.GetObjectValue(arguments[1]);
                        }
                        if (copyBack[2])
                        {
                            grid4[num7, num8] = RuntimeHelpers.GetObjectValue(arguments[2]);
                        }
                    }
                }
                vSlist = null;
                this.Dispose();
            }
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_AddHoaDonBanHang));
            this.Panel1 = new Panel();
            this.Label15 = new Label();
            this.TxtTongSoDuNo = new C1NumericEdit();
            this.Button1 = new Button();
            this.advKhachHang = new ADVObjects();
            this.Label7 = new Label();
            this.Label13 = new Label();
            this.TxtNgayChungTu = new DateTimePicker();
            this.Panel2 = new Panel();
            this.TxtSoTien = new C1NumericEdit();
            this.CmdExit = new Button();
            this.CmdOK = new Button();
            this.CKCheckAll = new CheckBox();
            this.VSlist = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.Panel1.SuspendLayout();
            ((ISupportInitialize) this.TxtTongSoDuNo).BeginInit();
            this.Panel2.SuspendLayout();
            ((ISupportInitialize) this.TxtSoTien).BeginInit();
            this.VSlist.BeginInit();
            this.SuspendLayout();
            this.Panel1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel1.Controls.Add(this.Label15);
            this.Panel1.Controls.Add(this.TxtTongSoDuNo);
            this.Panel1.Controls.Add(this.Button1);
            this.Panel1.Controls.Add(this.advKhachHang);
            this.Panel1.Controls.Add(this.Label7);
            this.Panel1.Controls.Add(this.Label13);
            this.Panel1.Controls.Add(this.TxtNgayChungTu);
            this.Panel1.Dock = DockStyle.Top;
            Point point = new Point(0, 0);
            this.Panel1.Location = point;
            this.Panel1.Name = "Panel1";
            Size size = new Size(0x32c, 0x2d);
            this.Panel1.Size = size;
            this.Panel1.TabIndex = 0;
            this.Label15.AutoSize = true;
            this.Label15.BackColor = Color.Transparent;
            this.Label15.ForeColor = Color.Black;
            point = new Point(0x171, 3);
            this.Label15.Location = point;
            this.Label15.Name = "Label15";
            size = new Size(0x4d, 13);
            this.Label15.Size = size;
            this.Label15.TabIndex = 0x83;
            this.Label15.Text = "Số dư c\x00f4ng nợ";
            this.TxtTongSoDuNo.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTongSoDuNo.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(370, 0x13);
            this.TxtTongSoDuNo.Location = point;
            this.TxtTongSoDuNo.Name = "TxtTongSoDuNo";
            Padding padding = new Padding(1);
            this.TxtTongSoDuNo.Padding = padding;
            this.TxtTongSoDuNo.ReadOnly = true;
            size = new Size(0x65, 20);
            this.TxtTongSoDuNo.Size = size;
            this.TxtTongSoDuNo.TabIndex = 130;
            this.TxtTongSoDuNo.Tag = null;
            this.TxtTongSoDuNo.TextAlign = HorizontalAlignment.Right;
            this.TxtTongSoDuNo.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTongSoDuNo.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTongSoDuNo.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Button1.FlatStyle = FlatStyle.System;
            point = new Point(0x1d7, 0x12);
            this.Button1.Location = point;
            padding = new Padding(0);
            this.Button1.Margin = padding;
            this.Button1.Name = "Button1";
            size = new Size(0x16, 0x16);
            this.Button1.Size = size;
            this.Button1.TabIndex = 0x80;
            this.Button1.Text = "...";
            this.Button1.UseVisualStyleBackColor = true;
            this.advKhachHang.Conditions = "";
            this.advKhachHang.LoaiDoiTuong = modGeneral.TypeObjects.KhachHang;
            point = new Point(0x63, 0x13);
            this.advKhachHang.Location = point;
            this.advKhachHang.Name = "advKhachHang";
            this.advKhachHang.ReadOnly = false;
            size = new Size(0x108, 20);
            this.advKhachHang.Size = size;
            this.advKhachHang.TabIndex = 0x74;
            this.advKhachHang.UpperText = true;
            this.advKhachHang.Value = "";
            this.advKhachHang.WidthCode = 80;
            this.Label7.AutoSize = true;
            this.Label7.BackColor = Color.Transparent;
            this.Label7.ForeColor = Color.Black;
            point = new Point(0x60, 3);
            this.Label7.Location = point;
            this.Label7.Name = "Label7";
            size = new Size(0x41, 13);
            this.Label7.Size = size;
            this.Label7.TabIndex = 0x75;
            this.Label7.Text = "Kh\x00e1ch h\x00e0ng";
            this.Label13.AutoSize = true;
            this.Label13.BackColor = Color.Transparent;
            this.Label13.ForeColor = Color.Black;
            point = new Point(2, 3);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x4e, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 0x25;
            this.Label13.Text = "T\x00ednh đến ng\x00e0y";
            this.TxtNgayChungTu.Format = DateTimePickerFormat.Short;
            point = new Point(5, 0x13);
            this.TxtNgayChungTu.Location = point;
            this.TxtNgayChungTu.Name = "TxtNgayChungTu";
            size = new Size(0x59, 20);
            this.TxtNgayChungTu.Size = size;
            this.TxtNgayChungTu.TabIndex = 0x24;
            this.Panel2.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel2.BackgroundImageLayout = ImageLayout.Stretch;
            this.Panel2.Controls.Add(this.TxtSoTien);
            this.Panel2.Controls.Add(this.CmdExit);
            this.Panel2.Controls.Add(this.CmdOK);
            this.Panel2.Dock = DockStyle.Bottom;
            point = new Point(0, 0x1f1);
            this.Panel2.Location = point;
            this.Panel2.Name = "Panel2";
            size = new Size(0x32c, 0x21);
            this.Panel2.Size = size;
            this.Panel2.TabIndex = 1;
            this.TxtSoTien.BorderStyle = BorderStyle.FixedSingle;
            this.TxtSoTien.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x2bd, 5);
            this.TxtSoTien.Location = point;
            this.TxtSoTien.Name = "TxtSoTien";
            padding = new Padding(1);
            this.TxtSoTien.Padding = padding;
            size = new Size(0x6c, 20);
            this.TxtSoTien.Size = size;
            this.TxtSoTien.TabIndex = 0x86;
            this.TxtSoTien.Tag = null;
            this.TxtSoTien.TextAlign = HorizontalAlignment.Right;
            this.TxtSoTien.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtSoTien.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtSoTien.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.CmdExit.Image = ACCOUNTING.My.Resources.Resources.Closed;
            this.CmdExit.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x54, 5);
            this.CmdExit.Location = point;
            this.CmdExit.Name = "CmdExit";
            size = new Size(0x4d, 0x18);
            this.CmdExit.Size = size;
            this.CmdExit.TabIndex = 0x81;
            this.CmdExit.Text = "Th&o\x00e1t";
            this.CmdExit.UseVisualStyleBackColor = true;
            this.CmdOK.Image = ACCOUNTING.My.Resources.Resources.Selected;
            this.CmdOK.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(4, 5);
            this.CmdOK.Location = point;
            this.CmdOK.Name = "CmdOK";
            size = new Size(0x4d, 0x18);
            this.CmdOK.Size = size;
            this.CmdOK.TabIndex = 0x80;
            this.CmdOK.Text = "&Chọn";
            this.CmdOK.UseVisualStyleBackColor = true;
            this.CKCheckAll.AutoSize = true;
            point = new Point(3, 0x30);
            this.CKCheckAll.Location = point;
            this.CKCheckAll.Name = "CKCheckAll";
            size = new Size(15, 14);
            this.CKCheckAll.Size = size;
            this.CKCheckAll.TabIndex = 0x22;
            this.CKCheckAll.UseVisualStyleBackColor = true;
            this.VSlist.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.XpThemes;
            this.VSlist.ColumnInfo = manager.GetString("VSlist.ColumnInfo");
            this.VSlist.Dock = DockStyle.Fill;
            this.VSlist.ExtendLastCol = true;
            this.VSlist.KeyActionEnter = KeyActionEnum.MoveAcross;
            point = new Point(0, 0x2d);
            this.VSlist.Location = point;
            padding = new Padding(0);
            this.VSlist.Margin = padding;
            this.VSlist.Name = "VSlist";
            this.VSlist.Rows.Count = 1;
            this.VSlist.Rows.DefaultSize = 0x11;
            size = new Size(0x32c, 0x1c4);
            this.VSlist.Size = size;
            this.VSlist.StyleInfo = manager.GetString("VSlist.StyleInfo");
            this.VSlist.TabIndex = 0x21;
            this.VSlist.VisualStyle = C1.Win.C1FlexGrid.VisualStyle.Office2007Blue;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x32c, 530);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.CKCheckAll);
            this.Controls.Add(this.VSlist);
            this.Controls.Add(this.Panel2);
            this.Controls.Add(this.Panel1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.Name = "Frm_AddHoaDonBanHang";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Text = "CHON HOA DON BAN HANG";
            this.Panel1.ResumeLayout(false);
            this.Panel1.PerformLayout();
            ((ISupportInitialize) this.TxtTongSoDuNo).EndInit();
            this.Panel2.ResumeLayout(false);
            ((ISupportInitialize) this.TxtSoTien).EndInit();
            this.VSlist.EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        public void LoadThanhToan()
        {
            this.VSlist.Rows.Count = 1;
            if (this.advKhachHang.Value.Trim() != "")
            {
                DataTable table = this.objTT.GetBanHangThanhToan(LVYModule.Date2Char(this.TxtNgayChungTu.Text), modGeneral.H_CLIENT, this.cFrmKhoa, "", LVYModule.ReturnIfNull(this.advKhachHang.Value, "", modGeneral.TypeOfValue.Nothing).ToString());
                if (table != null)
                {
                    int num2 = table.Rows.Count - 1;
                    for (int i = 0; i <= num2; i++)
                    {
                        C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                        vSlist.AddItem("");
                        vSlist[vSlist.Rows.Count - 1, 0] = RuntimeHelpers.GetObjectValue(table.Rows[i]["Khoa"]);
                        vSlist[vSlist.Rows.Count - 1, 2] = RuntimeHelpers.GetObjectValue(table.Rows[i]["KhoaTKThanhToan"]);
                        vSlist[vSlist.Rows.Count - 1, 3] = RuntimeHelpers.GetObjectValue(table.Rows[i]["SoTaiKhoan"]);
                        vSlist[vSlist.Rows.Count - 1, 4] = RuntimeHelpers.GetObjectValue(table.Rows[i]["NgayChungTu"]);
                        vSlist[vSlist.Rows.Count - 1, 5] = RuntimeHelpers.GetObjectValue(table.Rows[i]["SoChungTu"]);
                        vSlist[vSlist.Rows.Count - 1, 6] = RuntimeHelpers.GetObjectValue(table.Rows[i]["SoHoaDon"]);
                        vSlist[vSlist.Rows.Count - 1, 7] = RuntimeHelpers.GetObjectValue(table.Rows[i]["LoaiTien"]);
                        vSlist[vSlist.Rows.Count - 1, 8] = RuntimeHelpers.GetObjectValue(table.Rows[i]["TyGia"]);
                        vSlist[vSlist.Rows.Count - 1, 9] = RuntimeHelpers.GetObjectValue(table.Rows[i]["KhoaDoiTuong"]);
                        vSlist[vSlist.Rows.Count - 1, 10] = RuntimeHelpers.GetObjectValue(table.Rows[i]["TenDoiTuong"]);
                        vSlist[vSlist.Rows.Count - 1, 11] = RuntimeHelpers.GetObjectValue(table.Rows[i]["NgayThanhToan"]);
                        vSlist[vSlist.Rows.Count - 1, 12] = RuntimeHelpers.GetObjectValue(table.Rows[i]["TienHangNT"]);
                        vSlist[vSlist.Rows.Count - 1, 13] = RuntimeHelpers.GetObjectValue(table.Rows[i]["TienHang"]);
                        vSlist[vSlist.Rows.Count - 1, 14] = RuntimeHelpers.GetObjectValue(table.Rows[i]["DaThanhToan"]);
                        vSlist[vSlist.Rows.Count - 1, 15] = 0;
                        vSlist = null;
                    }
                }
            }
        }

        public double SumColOfGrid()
        {
            double num2 = 0.0;
            int num4 = this.VSlist.Rows.Count - 1;
            for (int i = 0; i <= num4; i++)
            {
                if (Conversion.Val(RuntimeHelpers.GetObjectValue(this.VSlist[i, 1])) != 0.0)
                {
                    num2 += Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 12]), 0, modGeneral.TypeOfValue.Nothing));
                }
            }
            return num2;
        }

        public void TotalOfVoucher()
        {
            double num = this.SumColOfGrid();
            this.TxtSoTien.Value = num;
        }

        private void VSlist_AfterEdit(object sender, RowColEventArgs e)
        {
            C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
            string str = Conversions.ToString(e.Row);
            switch (e.Col)
            {
                case 1:
                    if (Conversion.Val(RuntimeHelpers.GetObjectValue(vSlist[e.Row, 1])) != 0.0)
                    {
                        vSlist[e.Row, 15] = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[e.Row, 13]), 0, modGeneral.TypeOfValue.Nothing)) - Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[e.Row, 14]), 0, modGeneral.TypeOfValue.Nothing));
                    }
                    else
                    {
                        vSlist[e.Row, 15] = 0;
                    }
                    this.TotalOfVoucher();
                    break;

                case 15:
                    if (Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[e.Row, 15]), 0, modGeneral.TypeOfValue.Nothing)) > (Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[e.Row, 13]), 0, modGeneral.TypeOfValue.Nothing)) - Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[e.Row, 14]), 0, modGeneral.TypeOfValue.Nothing))))
                    {
                        LVYModule.ShowWarning(modGeneral.Tranlated("Số tiền thanh to\x00e1n kh\x00f4ng thể lớn hơn số tiền ph\x00e1t sinh!", ""));
                        vSlist[e.Row, 15] = 0;
                        vSlist[e.Row, 1] = false;
                    }
                    this.TotalOfVoucher();
                    break;
            }
            vSlist = null;
        }

        private void VSlist_BeforeEdit(object sender, RowColEventArgs e)
        {
            if ((e.Col != 1) & (e.Col != 15))
            {
                e.Cancel = true;
            }
        }

        internal virtual ADVObjects advKhachHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._advKhachHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                ADVObjects.ValueChangedEventHandler handler = new ADVObjects.ValueChangedEventHandler(this.advKhachHang_ValueChanged);
                if (this._advKhachHang != null)
                {
                    this._advKhachHang.ValueChanged -= handler;
                }
                this._advKhachHang = value;
                if (this._advKhachHang != null)
                {
                    this._advKhachHang.ValueChanged += handler;
                }
            }
        }

        internal virtual Button Button1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Button1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Button1 = value;
            }
        }

        internal virtual CheckBox CKCheckAll
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CKCheckAll;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CKCheckAll_Click);
                if (this._CKCheckAll != null)
                {
                    this._CKCheckAll.Click -= handler;
                }
                this._CKCheckAll = value;
                if (this._CKCheckAll != null)
                {
                    this._CKCheckAll.Click += handler;
                }
            }
        }

        internal virtual Button CmdExit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdExit_Click);
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click -= handler;
                }
                this._CmdExit = value;
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click += handler;
                }
            }
        }

        internal virtual Button CmdOK
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdOK;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdOK_Click);
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click -= handler;
                }
                this._CmdOK = value;
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click += handler;
                }
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label15
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label15;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label15 = value;
            }
        }

        internal virtual Label Label7
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label7;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label7 = value;
            }
        }

        internal virtual Panel Panel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel1 = value;
            }
        }

        internal virtual Panel Panel2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel2 = value;
            }
        }

        internal virtual DateTimePicker TxtNgayChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNgayChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNgayChungTu = value;
            }
        }

        internal virtual C1NumericEdit TxtSoTien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoTien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoTien = value;
            }
        }

        internal virtual C1NumericEdit TxtTongSoDuNo
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTongSoDuNo;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTongSoDuNo = value;
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSlist
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSlist;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                RowColEventHandler handler = new RowColEventHandler(this.VSlist_AfterEdit);
                RowColEventHandler handler2 = new RowColEventHandler(this.VSlist_BeforeEdit);
                if (this._VSlist != null)
                {
                    this._VSlist.AfterEdit -= handler;
                    this._VSlist.BeforeEdit -= handler2;
                }
                this._VSlist = value;
                if (this._VSlist != null)
                {
                    this._VSlist.AfterEdit += handler;
                    this._VSlist.BeforeEdit += handler2;
                }
            }
        }
    }
}

